A=input().split()
worditema=['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
if len (A)!==3 and A[i] not in worditema:
    for i in range(3):
        print("right")
    else:
        print("wrong input")
for i in range(10):
    if a[0]==worditema[i]:
        s=i*100
        if a[1]==wordylak[i]:
            s+=i*10
            if a[2]==wordylak[i]:
                s+=i*1
print(s)
